package gold.contest;

import gold.utils.InputUtil;

/**
 * Created by fanzhenyu02 on 2021/12/10.
 * common problem solver template.
 */
public class LC6074 {
    public long startExecuteTime = System.currentTimeMillis();


    class Solution {
        public int percentageLetter(String s, char letter) {
            int cnt = 0;
            for (int i = 0; i < s.length(); i++) {
                if (s.charAt(i) == letter) cnt++;
            }

            return cnt * 100 / s.length();
        }
    }

    public void run() {
        System.out.println(new Solution().percentageLetter("foobar", 'o'));
    }

    public static void main(String[] args) throws Exception {
        LC6074 an = new LC6074();
        an.run();

        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
